#ifndef VPAS_AKPCAP_H
#define VPAS_AKPCAP_H
#include <stdint.h>
#include <sys/time.h>
#include "ieee80211.h"
#include "airkiss.h"

#define PCAPNG_MAXSNAPLEN	0xffff

#define AIRKISS_LEADING_TO  (100)         // 100 milliseconds
#define AIRKISS_PROCESS_TO  (60 * 1000)   // 60 seconds

/**
 * @brief iw_scanning
 * 扫描获取当前无线环境中所有非隐蔽AP的ssid，rssi以及信道
 * @return
 */
typedef struct {
    char ssid[32];
    int rssi;
    int chanel;
} vps_ap;
vps_ap* iw_scanning();

int opensocket(char const* ifname);
void closesocket(int sockfd, char const* ifname);
int set_channel(int sockfd, char const* ifname, int channel);
int read_packet(int sockfd, void* data, unsigned int sz, struct timeval* tvf);

#endif //VPAS_AKPCAP_H
